package com.zhou.config;

import com.zhou.filter.JwtAuthenticationTokenFilter;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: zhoujinchuan
 * @Description: TODO（请添加描述）
 * @CreateTime: 2023/10/26 9:37
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new JwtAuthenticationTokenFilter()).addPathPatterns("/**").excludePathPatterns("/login","/swagger-ui/**",
                "/swagger-resources/**",
                "/webjars/**",
                "/v2/**",
                "/doc.html");
    }
}